-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#4412] feat(api): add validate check for default position when updating column position #4451
[#4412] feat(api): add validate check for default position when updating column position #4451
Conversation
@LiuQhahah , please fix the ci and test failures like |
I have fixed the testUpdateIcebergColumnDefaultPosition UT and formated the code. |
...va/org/apache/gravitino/catalog/lakehouse/iceberg/integration/test/CatalogIcebergBaseIT.java
Outdated
Show resolved
Hide resolved
…n't allow default position in UpdateColumnPosition
…ition-when-updating-column-positions
Looks like there's some style issue needs to be fixed, @LiuQhahah would you please fix it. |
…ition-when-updating-column-positions
…or-ColumnPosition-when-updating-column-positions' into apache#4412-add-validate-check-for-ColumnPosition-when-updating-column-positions
…ition-when-updating-column-positions
There're some residual logic to process DefaultColumnPosition in private void doUpdateColumnPosition(
UpdateSchema icebergUpdateSchema,
UpdateColumnPosition updateColumnPosition,
Schema icebergTableSchema) {
StructType tableSchema = icebergTableSchema.asStruct();
// not need any more
ColumnPosition columnPosition =
getColumnPositionForIceberg(tableSchema, updateColumnPosition.getPosition());
doMoveColumn(icebergUpdateSchema, updateColumnPosition.fieldName(), columnPosition);
} |
…n due to supporting update the column position to default position isn't allowed.
…or-ColumnPosition-when-updating-column-positions' into apache#4412-add-validate-check-for-ColumnPosition-when-updating-column-positions
…ition-when-updating-column-positions
@LiuQhahah , thanks for your contribution, and hope you enjoy the journey. |
What changes were proposed in this pull request?
add validate check for ColumnPosition when updating column positions,
If the position is default, will throw exception.
Why are the changes needed?
Fix: #4412
Does this PR introduce any user-facing change?
No
How was this patch tested?
the UT has been added.